﻿@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>FilesUpload</title>
    <style type="text/css">
        #queue {
            background-color: #FFF;
            border: 1px solid #E5E5E5;
            border-radius: 5px;
            height: 178px;
            margin-bottom: 5px;
            overflow: auto;
            padding: 3px;
            width: 300px;
        }
    </style>
    <link href="~/Content/uploadify/uploadify.css" rel="stylesheet" />
    <script src="~/Content/js/jquery-1.8.2.js"></script>
    <script src="~/Content/uploadify/jquery.uploadify.js"></script>
    <script src="~/Content/js/tjzheng.js"></script>
    <script src="~/Content/js/jquery.form.js"></script>
    <script type="text/javascript">
        function SingleImgSuccess(objFile, objInvokeResult) {
            if (objInvokeResult.ResultCode == "Success") {
                var imgSelector = "img." + this.selector.replace("#", "");
                $(imgSelector).attr("src", objInvokeResult.Data);
                $("input[name=" + StringToJosn(this.formData.UploadSet).Name + "]").val(objInvokeResult.Data);
            } else {
                alert(objInvokeResult.ResultMessage);
            }
        }
    </script>
</head>
<body>
    <div>
        <form id="form" enctype="multipart/form-data">
            <table>
                <tr>
                    <td>Name:</td>
                    <td colspan="3">
                        <input name="objFileEntity.Name" type="text" /></td>
                </tr>
                <tr>
                    <td>Image:</td>
                    <td>
                        @*@Html.UpLoadImage(new UpLoadSet { Id = "#file_upload", ULId = 2, Name = "TestName" })*@
                        @Html.UpLoadImage("#file_upload", 2, "TestName", "")
                    </td>
                    <td>
                        <img class="file_upload" src="#" />
                    </td>
                </tr>
            </table>
        </form>
    </div>
</body>
</html>
